// AddCodeDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Lightning.h"
#include "AddCodeDlg.h"
#include "afxdialogex.h"


// CAddCodeDlg dialog

IMPLEMENT_DYNAMIC(CAddCodeDlg, CDialogEx)

CAddCodeDlg::CAddCodeDlg(CWnd* pParent /*=NULL*/)
	: CDialogEx(CAddCodeDlg::IDD, pParent)
{

}

CAddCodeDlg::~CAddCodeDlg()
{
}

void CAddCodeDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CAddCodeDlg, CDialogEx)
	ON_BN_CLICKED(IDC_BTN_SAVE, &CAddCodeDlg::OnBnClickedBtnSave)
	ON_BN_CLICKED(IDC_BTN_CANCLE, &CAddCodeDlg::OnBnClickedBtnCancle)
END_MESSAGE_MAP()


// CAddCodeDlg message handlers


BOOL CAddCodeDlg::PreTranslateMessage(MSG* pMsg)
{
	// TODO: Add your specialized code here and/or call the base class
	if (pMsg->message == WM_KEYDOWN)
	{
		if (pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE)
		{
			return TRUE;
		}
	}
	return CDialogEx::PreTranslateMessage(pMsg);
}


BOOL CAddCodeDlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	// TODO:  Add extra initialization here

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}


void CAddCodeDlg::OnBnClickedBtnSave()
{
	// TODO: Add your control notification handler code here
	GetDlgItemText(IDC_EDIT_ADD_CODE, str);
	CDialogEx::OnOK();
}


void CAddCodeDlg::OnBnClickedBtnCancle()
{
	// TODO: Add your control notification handler code here
	CDialogEx::OnCancel();
}
